package cn.itcast.dewu.utils;

public class RedisConstants {
    //登录验证码的key
    public static final String LOGIN_CODE_KEY = "login:code:";
    //验证码的过期时间
    public static final Long LOGIN_CODE_TTL = 2L;
    //保存token 并设置过期时间
    public static final String LOGIN_USER_KEY = "login:token:";
    public static final Long LOGIN_USER_TTL = 30L;

    //用户名的前缀
    public static final String USER_NICK_NAME_PREFIX = "dewu_user_";
    //空值存活时间
    public static final Long CACHE_NULL_TTL = 2L;

    //商品信息的缓存
    public static final Long CACHE_GOODS_TTL = 30L;
    public static final String CACHE_GOODS_KEY = "cache:goods:";

    //商品类型的缓存
    public static final String CACHE_LIST_KEY = "list:goods:types:";



    //商品锁的key
    public static final String LOCK_GOODS_KEY = "lock:goods:";
    //特价商品锁的key
    public static final String LOCK_SPECIALGOODS_KEY = "lock:specialgoods:";



    //优惠券
    public static final String CACHE_VOUCHER_LIST_KEY = "voucher:list:";
    public static final Long CACHE_VOUCHER_TTL = 30L;

    //秒杀劵的库存
    public static final String SECKILL_STOCK_KEY = "seckill:stock:";
//    特价商品的key
    public static final String GOODS_STOCK_KEY = "goods:stock:";
    public static final String SPECIAL_GOODS_STOCK_KEY = "goods:special:stock:";
    //优惠券的鎖
    public static final String VOUCHER_LOCAK_KEY = "voucher:locak:";
    //订单的键值
    public static final String VOUCHER_ORDER_KEY = "voucher:order:";


    //查看某个商品累的的key
    public static final String GOODS_TYPE_ONE =   "goods:type:one";
    public static final Long GOODS_TYPE_ONE_TTL = 30L;
    public static final String GOODS_TYPE_LOCK =  "goods:type:lock";

    public static final String BLOG_LIKED_KEY = "blog:liked:";
    public static final String FEED_KEY = "feed:";
    public static final String SHOP_GEO_KEY = "shop:geo:";
    public static final String USER_SIGN_KEY = "sign:";
}
